/*
 * @Description:
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2023-10-27 14:49:36
 * @LastEditors: Seven
 * @LastEditTime: 2024-01-18 09:53:33
 */
import React, { memo, useEffect } from "react";

const ChildEmergency = memo(() => {
  useEffect(() => {
    const domIframe = document.querySelector("#iframeId");
    console.log("domIframe", domIframe);
    console.log(
      "domIframe",
      domIframe.contentWindow.document,
      domIframe.contentWindow.document.querySelector(".page-loading")
    );
    domIframe.addEventListener("load", () => {
      setTimeout(() => {
        console.log(domIframe.contentWindow.document);
      }, 500);
    });
  });

  return (
    <div>
      <iframe
        id="iframeId"
        title="应急管理中心"
        src="http://192.168.212.55:8502"
        width="100%"
        height="900"
        sandbox="allow-scripts allow-top-navigation allow-same-origin"
      ></iframe>
    </div>
  );
});

export default ChildEmergency;
